package com.xdqzy.baseline.common;

import com.xdqzy.baseline.common.constant.LoginRole;
import com.xdqzy.baseline.common.model.UserSessionModel;
import org.springframework.stereotype.Component;

/**
 * @version V1.0
 * @Title: 获取用户会话信息
 * @ClassName: com.xdqzy.baseline.common.UserSessionManager.java
 * @Description:
 * @author: winter
 * @date: 2020-10-24 21:01
 */
@Component
public class UserSessionManager {
    private UserSessionModel mockUser = new UserSessionModel("admin", LoginRole.OPERATE, "运营管理员", "admin");
//    private UserSessionModel mockUser = new UserSessionModel("operateAdmin", LoginRole.SUPPLY, "供应商管理员", "operateAdmin");
//    private UserSessionModel mockUser = new UserSessionModel("purchaseUser", LoginRole.PURCHASE, "采购方", "purchaseUser");

    /**
     * 模拟获取用户
     *
     * @return
     */
    public UserSessionModel getCurrentUser() {
        return mockUser;
    }
}
